<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body  onload="check-Cookies()">
    <h1 onclick="this.innerHTML='shuangshunag'">click me!</h1>

    <script>
        function changetext(id){
            id.innerHTML = "Oooops!"
        }
    </script>
    <h1 onclick="changetext(this)">click!</h1>

    <script>
        function checkCookies(){
            if (navigator.cookieEnabled==true){
                alert("Cookies 可用")
            }
            else{
                alert("Cookies 不可用")
            }
        }
        </script>
        <p>弹窗-提示浏览器 cookie 是否可用。</p>


        <input id="fname" type="text" onchange="myFunction()">
        <p>当你离开输入框后，函数将被触发，将小写字母转为大写字母。</p>
        <script>
            function myFunction(){
                var x = document.getElementById("fname");
                x.value = x.value.toUpperCase();
            }
        </script>

        <div id="testmouse" style="background-color:#D94A38;width:120px;height:20px;padding:40px;" 
        onmousedown="down()" onmousemove="move(this)" onmouseout="out()" onmouseover="over(this)" 
        onclick="click()" onfocus="focus()">
            Mouse Over Me
        </div>
        <script>
            function down(){
                document.getElementById("testmouse").style.backgroundColor = "green";
            }
            function move(obj){
                obj.innerHTML = "Thank you!"
            }
            function over(obj){
                obj.style.backgroundColor = "yellow";
            }
            function over(obj){
                obj.style.backgroundColor = "blue";
            }
        </script>

</body>
</html>